<template>
	<view>
		<!-- <view class="top"></view> -->
		<view class="content">
			<view class="title">{{msg.title}}</view>
			<view class="time">{{msg.createdAt}}</view>
			<view class="msg">{{msg.content}}</view>	
		</view>
	</view>
</template>

<script>
	import{ selectMsgInfo} from '@/apis/message/index.js'
	export default {
		data() {
			return {
				id:'',
				msg:'',
			}
		},
		onLoad(option) {
			this.id = option.id,
			console.log(this.id)
			this.get()
		},
		methods: {
			async get(){
				let id = this.id
				let res =await selectMsgInfo({id:this.id,messageType:1})
				console.log(res,'xiangqing')
				if(res.success){
					this.msg = res.object
				}
			}
		}
	}
</script>

<style lang="less" scoped>
	.top{
		height: 1rpx;
		background: rgba(0, 0, 0, 0.1);
	}
	.content{
		padding: 30rpx 40rpx;
		box-sizing: border-box;
		.title{
			font-size: 32rpx;
			font-weight: 500;
			color: #0E0E0E;
			line-height: 44rpx;
			white-space:nowrap;
			margin-bottom: 20rpx;
			
		}
		.time{
			font-size: 28rpx;
			color: #8F8F8F;
			line-height: 40rpx;
			margin-bottom: 20rpx;
		}
		.msg{
			font-size: 28rpx;
			line-height: 40rpx;
		}
	}
</style>
